package com.mikufufu.blog.service.impl;

import com.mikufufu.blog.common.entity.Query;
import com.mikufufu.blog.mapper.SearchMapper;
import com.mikufufu.blog.model.vo.api.SearchVO;
import com.mikufufu.blog.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 搜索服务实现类
 * 
 */
@Service
public class SearchServiceImpl implements SearchService {

    @Autowired
    private SearchMapper searchMapper;

    @Override
    public List<SearchVO> list(String content) {
        return searchMapper.list(content);
    }

    @Override
    public List<SearchVO> page(Query query, String content) {
        return searchMapper.page(query.getPage(),content);
    }
}
